//Javascript for assigning values to the parent inputs
function properties(propertyname,value)
{
	window.parent.properties(propertyname,value)
}

//Javascript to set the scroll state [Function SetScrollState] 
function setscrollstate()
{
	var scrollleft=0;
	var scrollheight = 0;
	if(navigator.userAgent.indexOf("Netscape") >0 )
	{
		scrollleft = window.innerWidth;
		scrollheight = window.innerHeight;
	}
	else
	{
		scrollleft = window.document.body.offsetWidth;
		scrollheight = window.document.body.offsetHeight;
	}

	scrollleft = (<%#sLeft%> - (scrollleft/2))+((<%#sWidth%> - <%#sLeft%>)/2);
	scrollheight = (<%#sTop%> - (scrollheight/2))+((<%#sHeight%> - <%#sTop%> )/2);						

	window.scrollTo (scrollleft,scrollheight);
}



//Javascript function to resize the image
var imgheight = 0;
var imgwidth = 0;
function wf_resizeimage(resizepercent)
{
	var location=window.location.href;
	
	if( location.indexOf("&zoom") > 0 )
	{
		var zoomlocation = location.indexOf("&zoom=");
		var str = location.substring(0,zoomlocation);
		str = str + location.substring(zoomlocation+10);
		str = str + "&zoom=" + resizepercent;
		window.location = str;
	}
	else
		window.location = window.location + "&zoom="  + resizepercent;
}
